home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / GNU / emacs.inst / emacs19.idb / usr / gnu / info / elisp-30.z / elisp-30
Encoding:
GNU Info File  |  1994-08-02  |  36.4 KB  |  1,111 lines

  1. This is Info file elisp, produced by Makeinfo-1.55 from the input file
  2. elisp.texi.
  3.  
  4.    This version is newer than the second printed edition of the GNU
  5. Emacs Lisp Reference Manual.  It corresponds to Emacs Version 19.19.
  6.  
  7.    Published by the Free Software Foundation 675 Massachusetts Avenue
  8. Cambridge, MA 02139 USA
  9.  
  10.    Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided that
  18. the entire resulting derived work is distributed under the terms of a
  19. permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that this permission notice may be stated in a
  24. translation approved by the Foundation.
  25.  
  26.    Permission is granted to copy and distribute modified versions of
  27. this manual under the conditions for verbatim copying, provided also
  28. that the section entitled "GNU Emacs General Public License" is included
  29. exactly as in the original, and provided that the entire resulting
  30. derived work is distributed under the terms of a permission notice
  31. identical to this one.
  32.  
  33.    Permission is granted to copy and distribute translations of this
  34. manual into another language, under the above conditions for modified
  35. versions, except that the section entitled "GNU Emacs General Public
  36. License" may be included in a translation approved by the Free Software
  37. Foundation instead of in the original English.
  38.  
  39. 
  40. File: elisp,  Node: Pure Storage,  Next: Garbage Collection,  Prev: Building Emacs,  Up: GNU Emacs Internals
  41.  
  42. Pure Storage
  43. ============
  44.  
  45.    There are two types of storage in GNU Emacs Lisp for user-created
  46. Lisp objects: "normal storage" and "pure storage".  Normal storage is
  47. where all the new data which is created during an Emacs session is kept;
  48. see the following section for information on normal storage.  Pure
  49. storage is used for certain data in the preloaded standard Lisp files:
  50. data that should never change during actual use of Emacs.
  51.  
  52.    Pure storage is allocated only while `temacs' is loading the
  53. standard preloaded Lisp libraries.  In the file `emacs', it is marked
  54. as read-only (on operating systems which permit this), so that the
  55. memory space can be shared by all the Emacs jobs running on the machine
  56. at once.  Pure storage is not expandable; a fixed amount is allocated
  57. when Emacs is compiled, and if that is not sufficient for the preloaded
  58. libraries, `temacs' crashes.  If that happens, you will have to
  59. increase the compilation parameter `PURESIZE' in the file `config.h'.
  60. This normally won't happen unless you try to preload additional
  61. libraries or add features to the standard ones.
  62.  
  63.  - Function: purecopy OBJECT
  64.      This function makes a copy of OBJECT in pure storage and returns
  65.      it.  It copies strings by simply making a new string with the same
  66.      characters in pure storage.  It recursively copies the contents of
  67.      vectors and cons cells.  It does not make copies of symbols, or any
  68.      other objects, but just returns them unchanged.  It signals an
  69.      error if asked to copy markers.
  70.  
  71.      This function is used only while Emacs is being built and dumped;
  72.      it is called only in the file `emacs/lisp/loaddefs.el'.
  73.  
  74.  - Variable: pure-bytes-used
  75.      The value of this variable is the number of bytes of pure storage
  76.      allocated so far.  Typically, in a dumped Emacs, this number is
  77.      very close to the total amount of pure storage available--if it
  78.      were not, we would preallocate less.
  79.  
  80.  - Variable: purify-flag
  81.      This variable determines whether `defun' should make a copy of the
  82.      function definition in pure storage.  If it is non-`nil', then the
  83.      function definition is copied into pure storage.
  84.  
  85.      This flag is `t' while loading all of the basic functions for
  86.      building Emacs initially (allowing those functions to be sharable
  87.      and non-collectible).  It is set to `nil' when Emacs is saved out
  88.      as `emacs'.  The flag is set and reset in the C sources.
  89.  
  90.      You should not change this flag in a running Emacs.
  91.  
  92. 
  93. File: elisp,  Node: Garbage Collection,  Next: Writing Emacs Primitives,  Prev: Pure Storage,  Up: GNU Emacs Internals
  94.  
  95. Garbage Collection
  96. ==================
  97.  
  98.    When a program creates a list or the user defines a new function
  99. (such as by loading a library), then that data is placed in normal
  100. storage.  If normal storage runs low, then Emacs asks the operating
  101. system to allocate more memory in blocks of 1k bytes.  Each block is
  102. used for one type of Lisp object, so symbols, cons cells, markers, etc.
  103. are segregated in distinct blocks in memory.  (Vectors, buffers and
  104. certain other editing types, which are fairly large, are allocated in
  105. individual blocks, one per object, while strings are packed into blocks
  106. of 8k bytes.)
  107.  
  108.    It is quite common to use some storage for a while, then release it
  109. by, for example, killing a buffer or deleting the last pointer to an
  110. object.  Emacs provides a "garbage collector" to reclaim this abandoned
  111. storage.  (This name is traditional, but "garbage recycler" might be a
  112. more intuitive metaphor for this facility.)
  113.  
  114.    The garbage collector operates by scanning all the objects that have
  115. been allocated and marking those that are still accessible to Lisp
  116. programs.  To begin with, all the symbols, their values and associated
  117. function definitions, and any data presently on the stack, are
  118. accessible.  Any objects which can be reached indirectly through other
  119. accessible objects are also accessible.
  120.  
  121.    When this is finished, all inaccessible objects are garbage.  No
  122. matter what the Lisp program or the user does, it is impossible to refer
  123. to them, since there is no longer a way to reach them.  Their space
  124. might as well be reused, since no one will notice.  That is what the
  125. garbage collector arranges to do.
  126.  
  127.    Unused cons cells are chained together onto a "free list" for future
  128. allocation; likewise for symbols and markers.  The accessible strings
  129. are compacted so they are contiguous in memory; then the rest of the
  130. space formerly occupied by strings is made available to the string
  131. creation functions.  Vectors, buffers, windows and other large objects
  132. are individually allocated and freed using `malloc'.
  133.  
  134.      Common Lisp note: unlike other Lisps, GNU Emacs Lisp does not call
  135.      the garbage collector when the free list is empty.  Instead, it
  136.      simply requests the operating system to allocate more storage, and
  137.      processing continues until `gc-cons-threshold' bytes have been
  138.      used.
  139.  
  140.      This means that you can make sure that the garbage collector will
  141.      not run during a certain portion of a Lisp program by calling the
  142.      garbage collector explicitly just before it (provided that portion
  143.      of the program does not use so much space as to force a second
  144.      garbage collection).
  145.  
  146.  - Command: garbage-collect
  147.      This command runs a garbage collection, and returns information on
  148.      the amount of space in use.  (Garbage collection can also occur
  149.      spontaneously if you use more than `gc-cons-threshold' bytes of
  150.      Lisp data since the previous garbage collection.)
  151.  
  152.      `garbage-collect' returns a list containing the following
  153.      information:
  154.  
  155.           ((USED-CONSES . FREE-CONSES)
  156.            (USED-SYMS . FREE-SYMS)
  157.            (USED-MARKERS . FREE-MARKERS)
  158.            USED-STRING-CHARS
  159.            USED-VECTOR-SLOTS
  160.            (USED-FLOATS . FREE-FLOATS))
  161.           
  162.           (garbage-collect)
  163.                => ((3435 . 2332) (1688 . 0)
  164.                      (57 . 417) 24510 3839 (4 . 1))
  165.  
  166.      Here is a table explaining each element:
  167.  
  168.     USED-CONSES
  169.           The number of cons cells in use.
  170.  
  171.     FREE-CONSES
  172.           The number of cons cells for which space has been obtained
  173.           from the operating system, but that are not currently being
  174.           used.
  175.  
  176.     USED-SYMS
  177.           The number of symbols in use.
  178.  
  179.     FREE-SYMS
  180.           The number of symbols for which space has been obtained from
  181.           the operating system, but that are not currently being used.
  182.  
  183.     USED-MARKERS
  184.           The number of markers in use.
  185.  
  186.     FREE-MARKERS
  187.           The number of markers for which space has been obtained from
  188.           the operating system, but that are not currently being used.
  189.  
  190.     USED-STRING-CHARS
  191.           The total size of all strings, in characters.
  192.  
  193.     USED-VECTOR-SLOTS
  194.           The total number of elements of existing vectors.
  195.  
  196.     USED-FLOATS
  197.           The number of floats in use.
  198.  
  199.     FREE-FLOATS
  200.           The number of floats for which space has been obtained from
  201.           the operating system, but that are not currently being used.
  202.  
  203.  - User Option: gc-cons-threshold
  204.      The value of this variable is the number of bytes of storage that
  205.      must be allocated for Lisp objects after one garbage collection in
  206.      order to request another garbage collection.  A cons cell counts
  207.      as eight bytes, a string as one byte per character plus a few
  208.      bytes of overhead, and so on.  (Space allocated to the contents of
  209.      buffers does not count.)  Note that the new garbage collection
  210.      does not happen immediately when the threshold is exhausted, but
  211.      only the next time the Lisp evaluator is called.
  212.  
  213.      The initial threshold value is 100,000.  If you specify a larger
  214.      value, garbage collection will happen less often.  This reduces the
  215.      amount of time spent garbage collecting, but increases total
  216.      memory use.  You may want to do this when running a program which
  217.      creates lots of Lisp data.
  218.  
  219.      You can make collections more frequent by specifying a smaller
  220.      value, down to 10,000.  A value less than 10,000 will remain in
  221.      effect only until the subsequent garbage collection, at which time
  222.      `garbage-collect' will set the threshold back to 10,000.
  223.  
  224.  - Function: memory-limit
  225.      This function returns the address of the last byte Emacs has
  226.      allocated, divided by 1024.  We divide the value by 1024 to make
  227.      sure it fits in a Lisp integer.
  228.  
  229.      You can use this to get a general idea of how your actions affect
  230.      the memory usage.
  231.  
  232. 
  233. File: elisp,  Node: Writing Emacs Primitives,  Next: Object Internals,  Prev: Garbage Collection,  Up: GNU Emacs Internals
  234.  
  235. Writing Emacs Primitives
  236. ========================
  237.  
  238.    Lisp primitives are Lisp functions implemented in C.  The details of
  239. interfacing the C function so that Lisp can call it are handled by a few
  240. C macros.  The only way to really understand how to write new C code is
  241. to read the source, but we can explain some things here.
  242.  
  243.    An example of a special form is the definition of `or', from
  244. `eval.c'.  (An ordinary function would have the same general
  245. appearance.)
  246.  
  247.      DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
  248.        "Eval args until one of them yields non-NIL, then return that value.\n\
  249.      The remaining args are not evalled at all.\n\
  250.  
  251.      If all args return NIL, return NIL.")
  252.        (args)
  253.           Lisp_Object args;
  254.      {
  255.        register Lisp_Object val;
  256.        Lisp_Object args_left;
  257.        struct gcpro gcpro1;
  258.  
  259.      if (NULL(args))
  260.          return Qnil;
  261.      
  262.        args_left = args;
  263.        GCPRO1 (args_left);
  264.  
  265.      do
  266.          {
  267.            val = Feval (Fcar (args_left));
  268.            if (!NULL (val))
  269.              break;
  270.            args_left = Fcdr (args_left);
  271.          }
  272.        while (!NULL(args_left));
  273.  
  274.      UNGCPRO;
  275.        return val;
  276.      }
  277.  
  278.    Let's start with a precise explanation of the arguments to the
  279. `DEFUN' macro.  Here are the general names for them:
  280.  
  281.      DEFUN (LNAME, FNAME, SNAME, MIN, MAX, INTERACTIVE, DOC)
  282.  
  283. LNAME
  284.      This is the name of the Lisp symbol to define with this function;
  285.      in the example above, it is `or'.
  286.  
  287. FNAME
  288.      This is the C function name for this function.  This is the name
  289.      that is used in C code for calling the function.  The name is, by
  290.      convention, `F' prepended to the Lisp name, with all dashes (`-')
  291.      in the Lisp name changed to underscores.  Thus, to call this
  292.      function from C code, call `For'.  Remember that the arguments must
  293.      be of type `Lisp_Object'; various macros and functions for creating
  294.      values of type `Lisp_Object' are declared in the file `lisp.h'.
  295.  
  296. SNAME
  297.      This is a C variable name to use for a structure that holds the
  298.      data for the subr object that represents the function in Lisp.
  299.      This structure conveys the Lisp symbol name to the initialization
  300.      routine that will create the symbol and store the subr object as
  301.      its definition.  By convention, this name is always FNAME with `F'
  302.      replaced with `S'.
  303.  
  304. MIN
  305.      This is the minimum number of arguments that the function
  306.      requires.  For `or', no arguments are required.
  307.  
  308. MAX
  309.      This is the maximum number of arguments that the function accepts.
  310.      Alternatively, it can be `UNEVALLED', indicating a special form
  311.      that receives unevaluated arguments.  A function with the
  312.      equivalent of an `&rest' argument would have `MANY' in this
  313.      position.  Both `UNEVALLED' and `MANY' are macros.  This argument
  314.      must be one of these macros or a number at least as large as MIN.
  315.      It may not be greater than six.
  316.  
  317. INTERACTIVE
  318.      This is an interactive specification, a string such as might be
  319.      used as the argument of `interactive' in a Lisp function.  In the
  320.      case of `or', it is 0 (a null pointer), indicating that `or'
  321.      cannot be called interactively.  A value of `""' indicates an
  322.      interactive function taking no arguments.
  323.  
  324. DOC
  325.      This is the documentation string.  It is written just like a
  326.      documentation string for a function defined in Lisp, except you
  327.      must write `\n\' at the end of each line.  In particular, the
  328.      first line should be a single sentence.
  329.  
  330.    After the call to the `DEFUN' macro, you must write the list of
  331. argument names that every C function must have, followed by ordinary C
  332. declarations for them.  Normally, all the arguments must be declared as
  333. `Lisp_Object'.  If the function has no upper limit on the number of
  334. arguments in Lisp, then in C it receives two arguments: the number of
  335. Lisp arguments, and the address of a block containing their values.
  336. These have types `int' and `Lisp_Object *'.
  337.  
  338.    Within the function `For' itself, note the use of the macros
  339. `GCPRO1' and `UNGCPRO'.  `GCPRO1' is used to "protect" a variable from
  340. garbage collection--to inform the garbage collector that it must look
  341. in that variable and regard its contents as an accessible object.  This
  342. is necessary whenever you call `Feval' or anything that can directly or
  343. indirectly call `Feval'.  At such a time, any Lisp object that you
  344. intend to refer to again must be protected somehow.  `UNGCPRO' cancels
  345. the protection of the variables that are protected in the current
  346. function.  It is necessary to do this explicitly.
  347.  
  348.    For most data types, it suffices to know that one pointer to the
  349. object is protected; as long as the object is not recycled, all pointers
  350. to it remain valid.  This is not so for strings, because the garbage
  351. collector can move them.  When a string is moved, any pointers to it
  352. that the garbage collector does not know about will not be properly
  353. relocated.  Therefore, all pointers to strings must be protected across
  354. any point where garbage collection may be possible.
  355.  
  356.    The macro `GCPRO1' protects just one local variable.  If you want to
  357. protect two, use `GCPRO2' instead; repeating `GCPRO1' will not work.
  358. There are also `GCPRO3' and `GCPRO4'.
  359.  
  360.    In addition to using these macros, you must declare the local
  361. variables such as `gcpro1' which they implicitly use.  If you protect
  362. two variables, with `GCPRO2', you must declare `gcpro1' and `gcpro2',
  363. as it uses them both.  Alas, we can't explain all the tricky details
  364. here.
  365.  
  366.    Defining the C function is not enough; you must also create the Lisp
  367. symbol for the primitive and store a suitable subr object in its
  368. function cell.  This is done by adding code to an initialization
  369. routine.  The code looks like this:
  370.  
  371.      defsubr (&SUBR-STRUCTURE-NAME);
  372.  
  373. SUBR-STRUCTURE-NAME is the name you used as the third argument to
  374. `DEFUN'.
  375.  
  376.    If you are adding a primitive to a file that already has Lisp
  377. primitives defined in it, find the function (near the end of the file)
  378. named `syms_of_SOMETHING', and add that function call to it.  If the
  379. file doesn't have this function, or if you create a new file, add to it
  380. a `syms_of_FILENAME' (e.g., `syms_of_myfile').  Then find the spot in
  381. `emacs.c' where all of these functions are called, and add a call to
  382. `syms_of_FILENAME' there.
  383.  
  384.    This function `syms_of_FILENAME' is also the place to define any C
  385. variables which are to be visible as Lisp variables.  `DEFVAR_LISP' is
  386. used to make a C variable of type `Lisp_Object' visible in Lisp.
  387. `DEFVAR_INT' is used to make a C variable of type `int' visible in Lisp
  388. with a value that is an integer.
  389.  
  390.    Here is another function, with more complicated arguments.  This
  391. comes from the code for the X Window System, and it demonstrates the
  392. use of macros and functions to manipulate Lisp objects.
  393.  
  394.      DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p,
  395.        Scoordinates_in_window_p, 2, 2,
  396.        "xSpecify coordinate pair: \nXExpression which evals to window: ",
  397.        "Return non-nil if POSITIONS is in WINDOW.\n\
  398.        \(POSITIONS is a list, (SCREEN-X SCREEN-Y)\)\n\
  399.  
  400.      Returned value is list of positions expressed\n\
  401.        relative to window upper left corner.")
  402.        (coordinate, window)
  403.           register Lisp_Object coordinate, window;
  404.      {
  405.        register Lisp_Object xcoord, ycoord;
  406.  
  407.      if (!CONSP (coordinate)) wrong_type_argument (Qlistp, coordinate);
  408.        CHECK_WINDOW (window, 2);
  409.        xcoord = Fcar (coordinate);
  410.        ycoord = Fcar (Fcdr (coordinate));
  411.        CHECK_NUMBER (xcoord, 0);
  412.        CHECK_NUMBER (ycoord, 1);
  413.  
  414.      if ((XINT (xcoord) < XINT (XWINDOW (window)->left))
  415.            || (XINT (xcoord) >= (XINT (XWINDOW (window)->left)
  416.                                  + XINT (XWINDOW (window)->width))))
  417.          {
  418.            return Qnil;
  419.          }
  420.        XFASTINT (xcoord) -= XFASTINT (XWINDOW (window)->left);
  421.  
  422.      if (XINT (ycoord) == (screen_height - 1))
  423.          return Qnil;
  424.  
  425.      if ((XINT (ycoord) < XINT (XWINDOW (window)->top))
  426.            || (XINT (ycoord) >= (XINT (XWINDOW (window)->top)
  427.                                  + XINT (XWINDOW (window)->height)) - 1))
  428.          {
  429.            return Qnil;
  430.          }
  431.  
  432.      XFASTINT (ycoord) -= XFASTINT (XWINDOW (window)->top);
  433.        return (Fcons (xcoord, Fcons (ycoord, Qnil)));
  434.      }
  435.  
  436.    Note that you cannot directly call functions defined in Lisp as, for
  437. example, the primitive function `Fcons' is called above.  You must
  438. create the appropriate Lisp form, protect everything from garbage
  439. collection, and `Feval' the form, as was done in `For' above.
  440.  
  441.    `eval.c' is a very good file to look through for examples; `lisp.h'
  442. contains the definitions for some important macros and functions.
  443.  
  444. 
  445. File: elisp,  Node: Object Internals,  Prev: Writing Emacs Primitives,  Up: GNU Emacs Internals
  446.  
  447. Object Internals
  448. ================
  449.  
  450.    GNU Emacs Lisp manipulates many different types of data.  The actual
  451. data are stored in a heap and the only access that programs have to it
  452. is through pointers.  Pointers are thirty-two bits wide in most
  453. implementations.  Depending on the operating system and type of machine
  454. for which you compile Emacs, twenty-four to twenty-six bits are used to
  455. address the object, and the remaining six to eight bits are used for a
  456. tag that identifies the object's type.
  457.  
  458.    Because all access to data is through tagged pointers, it is always
  459. possible to determine the type of any object.  This allows variables to
  460. be untyped, and the values assigned to them to be changed without regard
  461. to type.  Function arguments also can be of any type; if you want a
  462. function to accept only a certain type of argument, you must check the
  463. type explicitly using a suitable predicate (*note Type Predicates::.).
  464.  
  465. * Menu:
  466.  
  467. * Buffer Internals::    Components of a buffer structure.
  468. * Window Internals::    Components of a window structure.
  469. * Process Internals::   Components of a process structure.
  470.  
  471. 
  472. File: elisp,  Node: Buffer Internals,  Next: Window Internals,  Prev: Object Internals,  Up: Object Internals
  473.  
  474. Buffer Internals
  475. ----------------
  476.  
  477.    Buffers contain fields not directly accessible by the Lisp
  478. programmer.  We describe them here, naming them by the names used in
  479. the C code.  Many are accessible indirectly in Lisp programs via Lisp
  480. primitives.
  481.  
  482. `name'
  483.      The buffer name is a string which names the buffer.  It is
  484.      guaranteed to be unique.  *Note Buffer Names::.
  485.  
  486. `save_modified'
  487.      This field contains the time when the buffer was last saved, as an
  488.      integer.  *Note Buffer Modification::.
  489.  
  490. `modtime'
  491.      This field contains the modification time of the visited file.  It
  492.      is set when the file is written or read.  Every time the buffer is
  493.      written to the file, this field is compared to the modification
  494.      time of the file.  *Note Buffer Modification::.
  495.  
  496. `auto_save_modified'
  497.      This field contains the time when the buffer was last auto-saved.
  498.  
  499. `last_window_start'
  500.      This field contains the `window-start' position in the buffer as of
  501.      the last time the buffer was displayed in a window.
  502.  
  503. `undodata'
  504.      This field points to the buffer's undo stack.  *Note Undo::.
  505.  
  506. `syntax_table_v'
  507.      This field contains the syntax table for the buffer.  *Note Syntax
  508.      Tables::.
  509.  
  510. `downcase_table'
  511.      This field contains the conversion table for converting text to
  512.      lower case.  *Note Case Table::.
  513.  
  514. `upcase_table'
  515.      This field contains the conversion table for converting text to
  516.      upper case.  *Note Case Table::.
  517.  
  518. `case_canon_table'
  519.      This field contains the conversion table for canonicalizing text
  520.      for case-folding search.  *Note Case Table::.
  521.  
  522. `case_eqv_table'
  523.      This field contains the equivalence table for case-folding search.
  524.      *Note Case Table::.
  525.  
  526. `display_table'
  527.      This field contains the buffer's display table, or `nil' if it
  528.      doesn't have one.  *Note Display Tables::.
  529.  
  530. `markers'
  531.      This field contains the chain of all markers that point into the
  532.      buffer.  At each deletion or motion of the buffer gap, all of these
  533.      markers must be checked and perhaps updated.  *Note Markers::.
  534.  
  535. `backed_up'
  536.      This field is a flag which tells whether a backup file has been
  537.      made for the visited file of this buffer.
  538.  
  539. `mark'
  540.      This field contains the mark for the buffer.  The mark is a marker,
  541.      hence it is also included on the list `markers'.  *Note The Mark::.
  542.  
  543. `local_var_alist'
  544.      This field contains the association list containing all of the
  545.      variables local in this buffer, and their values.  The function
  546.      `buffer-local-variables' returns a copy of this list.  *Note
  547.      Buffer-Local Variables::.
  548.  
  549. `mode_line_format'
  550.      This field contains a Lisp object which controls how to display
  551.      the mode line for this buffer.  *Note Mode Line Format::.
  552.  
  553. 
  554. File: elisp,  Node: Window Internals,  Next: Process Internals,  Prev: Buffer Internals,  Up: Object Internals
  555.  
  556. Window Internals
  557. ----------------
  558.  
  559.    Windows have the following accessible fields:
  560.  
  561. `frame'
  562.      The frame that this window is on.
  563.  
  564. `mini_p'
  565.      Non-`nil' if this window is a minibuffer window.
  566.  
  567. `height'
  568.      The height of the window, measured in lines.
  569.  
  570. `width'
  571.      The width of the window, measured in columns.
  572.  
  573. `buffer'
  574.      The buffer which the window is displaying.  This may change often
  575.      during the life of the window.
  576.  
  577. `dedicated'
  578.      Non-`nil' if this window is dedicated to its buffer.
  579.  
  580. `start'
  581.      The position in the buffer which is the first character to be
  582.      displayed in the window.
  583.  
  584. `pointm'
  585.      This is the value of point in the current buffer when this window
  586.      is selected; when it is not selected, it retains its previous
  587.      value.
  588.  
  589. `left'
  590.      This is the left-hand edge of the window, measured in columns.
  591.      (The leftmost column on the screen is column 0.)
  592.  
  593. `top'
  594.      This is the top edge of the window, measured in lines.  (The top
  595.      line on the screen is line 0.)
  596.  
  597. `next'
  598.      This is the window that is the next in the chain of siblings.
  599.  
  600. `prev'
  601.      This is the window that is the previous in the chain of siblings.
  602.  
  603. `force_start'
  604.      This is a flag which, if non-`nil', says that the window has been
  605.      scrolled explicitly by the Lisp program.  At the next redisplay, if
  606.      point is off the screen, instead of scrolling the window to show
  607.      the text around point, point will be moved to a location that is
  608.      on the screen.
  609.  
  610. `hscroll'
  611.      This is the number of columns that the display in the window is
  612.      scrolled horizontally to the left.  Normally, this is 0.
  613.  
  614. `use_time'
  615.      This is the last time that the window was selected.  The function
  616.      `get-lru-window' uses this field.
  617.  
  618. `display_table'
  619.      The window's display table, or `nil' if none is specified for it.
  620.  
  621. 
  622. File: elisp,  Node: Process Internals,  Prev: Window Internals,  Up: Object Internals
  623.  
  624. Process Internals
  625. -----------------
  626.  
  627.    The fields of a process are:
  628.  
  629. `name'
  630.      A string, the name of the process.
  631.  
  632. `command'
  633.      A list containing the command arguments that were used to start
  634.      this process.
  635.  
  636. `filter'
  637.      A function used to accept output from the process instead of a
  638.      buffer, or `nil'.
  639.  
  640. `sentinel'
  641.      A function called whenever the process receives a signal, or `nil'.
  642.  
  643. `buffer'
  644.      The associated buffer of the process.
  645.  
  646. `pid'
  647.      An integer, the Unix process ID.
  648.  
  649. `childp'
  650.      A flag, non-`nil' if this is really a child process.  It is `nil'
  651.      for a network connection.
  652.  
  653. `flags'
  654.      A symbol indicating the state of the process.  Possible values
  655.      include `run', `stop', `closed', etc.
  656.  
  657. `reason'
  658.      An integer, the Unix signal number that the process received that
  659.      caused the process to terminate or stop.  If the process has
  660.      exited, then this is the exit code it specified.
  661.  
  662. `mark'
  663.      A marker indicating the position of end of last output from this
  664.      process inserted into the buffer.  This is usually the end of the
  665.      buffer.
  666.  
  667. `kill_without_query'
  668.      A flag, non-`nil' meaning this process should not cause
  669.      confirmation to be needed if Emacs is killed.
  670.  
  671. 
  672. File: elisp,  Node: Standard Errors,  Next: Standard Buffer-Local Variables,  Prev: GNU Emacs Internals,  Up: Top
  673.  
  674. Standard Errors
  675. ***************
  676.  
  677.    Here is the complete list of the error symbols in standard Emacs,
  678. grouped by concept.  The list includes each symbol's message (on the
  679. `error-message' property of the symbol), and a cross reference to a
  680. description of how the error can occur.
  681.  
  682.    Each error symbol has an `error-conditions' property which is a list
  683. of symbols.  Normally, this list includes the error symbol itself, and
  684. the symbol `error'.  Occasionally it includes additional symbols, which
  685. are intermediate classifications, narrower than `error' but broader
  686. than a single error symbol.  For example, all the errors in accessing
  687. files have the condition `file-error'.
  688.  
  689.    As a special exception, the error symbol `quit' does not have the
  690. condition `error', because quitting is not considered an error.
  691.  
  692.    *Note Errors::, for an explanation of how errors are generated and
  693. handled.
  694.  
  695. `SYMBOL'
  696.      STRING; REFERENCE.
  697.  
  698. `error'
  699.      `"error"'
  700.      *Note Errors::.
  701.  
  702. `quit'
  703.      `"Quit"'
  704.      *Note Quitting::.
  705.  
  706. `args-out-of-range'
  707.      `"Args out of range"'
  708.      *Note Sequences Arrays Vectors::.
  709.  
  710. `arith-error'
  711.      `"Arithmetic error"'
  712.      See `/' and `%' in *Note Numbers::.
  713.  
  714. `beginning-of-buffer'
  715.      `"Beginning of buffer"'
  716.      *Note Motion::.
  717.  
  718. `buffer-read-only'
  719.      `"Buffer is read-only"'
  720.      *Note Read Only Buffers::.
  721.  
  722. `end-of-buffer'
  723.      `"End of buffer"'
  724.      *Note Motion::.
  725.  
  726. `end-of-file'
  727.      `"End of file during parsing"'
  728.      This is not a `file-error'.
  729.      *Note Input Functions::.
  730.  
  731. `file-error'
  732.      This error, and its subcategories, do not have error-strings,
  733.      because the error message is constructed from the data items alone
  734.      when the error condition `file-error' is present.
  735.      *Note Files::.
  736.  
  737. `file-locked'
  738.      This is a `file-error'.
  739.      *Note File Locks::.
  740.  
  741. `file-already-exists'
  742.      This is a `file-error'.
  743.      *Note Writing to Files::.
  744.  
  745. `file-supersession'
  746.      This is a `file-error'.
  747.      *Note Buffer Modification::.
  748.  
  749. `invalid-function'
  750.      `"Invalid function"'
  751.      *Note Classifying Lists::.
  752.  
  753. `invalid-read-syntax'
  754.      `"Invalid read syntax"'
  755.      *Note Input Functions::.
  756.  
  757. `invalid-regexp'
  758.      `"Invalid regexp"'
  759.      *Note Regular Expressions::.
  760.  
  761. `no-catch'
  762.      `"No catch for tag"'
  763.      *Note Catch and Throw::.
  764.  
  765. `search-failed'
  766.      `"Search failed"'
  767.      *Note Searching and Matching::.
  768.  
  769. `setting-constant'
  770.      `"Attempt to set a constant symbol"'
  771.      The values of the symbols `nil' and `t' may not be changed.
  772.      *Note Variables that Never Change: Constant Variables.
  773.  
  774. `void-function'
  775.      `"Symbol's function definition is void"'
  776.      *Note Function Cells::.
  777.  
  778. `void-variable'
  779.      `"Symbol's value as variable is void"'
  780.      *Note Accessing Variables::.
  781.  
  782. `wrong-number-of-arguments'
  783.      `"Wrong number of arguments"'
  784.      *Note Classifying Lists::.
  785.  
  786. `wrong-type-argument'
  787.      `"Wrong type argument"'
  788.      *Note Type Predicates::.
  789.  
  790. 
  791. File: elisp,  Node: Standard Buffer-Local Variables,  Next: Standard Keymaps,  Prev: Standard Errors,  Up: Top
  792.  
  793. Buffer-Local Variables
  794. **********************
  795.  
  796.    The table below shows all of the variables that are automatically
  797. local (when set) in each buffer in Emacs Version 18 with the common
  798. packages loaded.
  799.  
  800. `abbrev-mode'
  801.      *note Abbrevs::.
  802.  
  803. `auto-fill-function'
  804.      *note Auto Filling::.
  805.  
  806. `buffer-auto-save-file-name'
  807.      *note Auto-Saving::.
  808.  
  809. `buffer-backed-up'
  810.      *note Backup Files::.
  811.  
  812. `buffer-display-table'
  813.      *note Display Tables::.
  814.  
  815. `buffer-file-name'
  816.      *note Buffer File Name::.
  817.  
  818. `buffer-file-number'
  819.      *note Buffer File Name::.
  820.  
  821. `buffer-file-truename'
  822.      *note Buffer File Name::.
  823.  
  824. `buffer-offer-save'
  825.      *note Saving Buffers::.
  826.  
  827. `buffer-read-only'
  828.      *note Read Only Buffers::.
  829.  
  830. `buffer-saved-size'
  831.      *note Point::.
  832.  
  833. `buffer-undo-list'
  834.      *note Undo::.
  835.  
  836. `case-fold-search'
  837.      *note Searching and Case::.
  838.  
  839. `ctl-arrow'
  840.      *note Usual Display::.
  841.  
  842. `default-directory'
  843.      *note System Environment::.
  844.  
  845. `fill-column'
  846.      *note Auto Filling::.
  847.  
  848. `left-margin'
  849.      *note Indentation::.
  850.  
  851. `local-abbrev-table'
  852.      *note Abbrevs::.
  853.  
  854. `local-write-file-hooks'
  855.      *note Saving Buffers::.
  856.  
  857. `major-mode'
  858.      *note Mode Help::.
  859.  
  860. `mark-active'
  861.      *note The Mark::.
  862.  
  863. `mark-ring'
  864.      *note The Mark::.
  865.  
  866. `minor-modes'
  867.      *note Minor Modes::.
  868.  
  869. `mode-line-format'
  870.      *note Mode Line Data::.
  871.  
  872. `mode-name'
  873.      *note Mode Line Variables::.
  874.  
  875. `overwrite-mode'
  876.      *note Insertion::.
  877.  
  878. `paragraph-separate'
  879.      *note Standard Regexps::.
  880.  
  881. `paragraph-start'
  882.      *note Standard Regexps::.
  883.  
  884. `require-final-newline'
  885.      *note Insertion::.
  886.  
  887. `selective-display'
  888.      *note Selective Display::.
  889.  
  890. `selective-display-ellipses'
  891.      *note Selective Display::.
  892.  
  893. `tab-width'
  894.      *note Usual Display::.
  895.  
  896. `truncate-lines'
  897.      *note Truncation::.
  898.  
  899. 
  900. File: elisp,  Node: Standard Keymaps,  Next: Standard Hooks,  Prev: Standard Buffer-Local Variables,  Up: Top
  901.  
  902. Standard Keymaps
  903. ****************
  904.  
  905.    The following symbols are used as the names for various keymaps.
  906. Some of these exist when Emacs is first started, others are only loaded
  907. when their respective mode is used.  This is not an exhaustive list.
  908.  
  909.    Almost all of these maps are used as local maps.  Indeed, of the
  910. modes that presently exist, only Vip mode and Terminal mode ever change
  911. the global keymap.
  912.  
  913. `Buffer-menu-mode-map'
  914.      A full keymap used by Buffer Menu mode.
  915.  
  916. `c-mode-map'
  917.      A sparse keymap used in C mode as a local map.
  918.  
  919. `command-history-map'
  920.      A full keymap used by Command History mode.
  921.  
  922. `ctl-x-4-map'
  923.      A sparse keymap for subcommands of the prefix `C-x 4'.
  924.  
  925. `ctl-x-map'
  926.      A full keymap for `C-x' commands.
  927.  
  928. `debugger-mode-map'
  929.      A full keymap used by Debugger mode.
  930.  
  931. `dired-mode-map'
  932.      A full keymap for `dired-mode' buffers.
  933.  
  934. `doctor-mode-map'
  935.      A sparse keymap used by Doctor mode.
  936.  
  937. `edit-abbrevs-map'
  938.      A sparse keymap used in `edit-abbrevs'.
  939.  
  940. `edit-tab-stops-map'
  941.      A sparse keymap used in `edit-tab-stops'.
  942.  
  943. `electric-buffer-menu-mode-map'
  944.      A full keymap used by Electric Buffer Menu mode.
  945.  
  946. `electric-history-map'
  947.      A full keymap used by Electric Command History mode.
  948.  
  949. `emacs-lisp-mode-map'
  950.      A sparse keymap used in Emacs Lisp mode.
  951.  
  952. `function-keymap'
  953.      The keymap for the definitions of keypad and function keys.
  954.      If there are none, then it contains an empty sparse keymap.
  955.  
  956. `fundamental-mode-map'
  957.      The local keymap for Fundamental mode.
  958.      It is empty and should not be changed.
  959.  
  960. `Helper-help-map'
  961.      A full keymap used by the help utility package.
  962.      It has the same keymap in its value cell and in its function cell.
  963.  
  964. `Info-edit-map'
  965.      A sparse keymap used by the `e' command of Info.
  966.  
  967. `Info-mode-map'
  968.      A sparse keymap containing Info commands.
  969.  
  970. `isearch-mode-map'
  971.      A keymap that defines the characters you can type within
  972.      incremental search.
  973.  
  974. `lisp-interaction-mode-map'
  975.      A sparse keymap used in Lisp mode.
  976.  
  977. `lisp-mode-map'
  978.      A sparse keymap used in Lisp mode.
  979.  
  980. `mode-specific-map'
  981.      The keymap for characters following `C-c'.  Note, this is in the
  982.      global map.  This map is not actually mode specific: its name was
  983.      chosen to be informative for the user in `C-h b'
  984.      (`display-bindings'), where it describes the main use of the `C-c'
  985.      prefix key.
  986.  
  987. `occur-mode-map'
  988.      A local keymap used in Occur mode.
  989.  
  990. `query-replace-map'
  991.      A local keymap used for responses in `query-replace' and related
  992.      commands; also for `y-or-n-p' and `map-y-or-n-p'.  The functions
  993.      that use this map do not support prefix keys; they look up one
  994.      event at a time.
  995.  
  996. `text-mode-map'
  997.      A sparse keymap used by Text mode.
  998.  
  999. `view-mode-map'
  1000.      A full keymap used by View mode.
  1001.  
  1002. 
  1003. File: elisp,  Node: Standard Hooks,  Next: Antinews,  Prev: Standard Keymaps,  Up: Top
  1004.  
  1005. Standard Hooks
  1006. **************
  1007.  
  1008.    The following is a list of hook variables which let you provide
  1009. functions to be called from within Emacs on suitable occasions.
  1010.  
  1011.    Most of these variables have names ending with `-hook' are "normal
  1012. hooks", that are run with `run-hooks'.  The value of such a hook is a
  1013. list of functions.  The recommended way to put a new function on such a
  1014. hook is to call `add-hook'.  *Note Hooks::, for more information about
  1015. using hooks.
  1016.  
  1017.    The variables whose names end in `-function' have single functions
  1018. as their values.  Usually there is a specific reason why the variable is
  1019. not a normal hook, such as, the need to pass an argument to the
  1020. function.  (In older Emacs versions, some of these variables had names
  1021. ending in `-hook' even though they were not normal hooks.)
  1022.  
  1023.    The variables whose names end in `-hooks' have lists of functions as
  1024. their values, but these functions are called in a special way (they are
  1025. passed arguments, or else their values are used).
  1026.  
  1027. `activate-mark-hook'
  1028. `after-change-function'
  1029. `after-init-hook'
  1030. `auto-fill-function'
  1031. `auto-save-hook'
  1032. `before-change-function'
  1033. `before-init-hook'
  1034. `blink-paren-function'
  1035. `c-mode-hook'
  1036. `calendar-load-hook'
  1037. `command-history-hook'
  1038. `comment-indent-function'
  1039. `deactivate-mark-hook'
  1040. `diary-display-hook'
  1041. `diary-hook'
  1042. `dired-mode-hook'
  1043. `disabled-command-hook'
  1044. `edit-picture-hook'
  1045. `electric-buffer-menu-mode-hook'
  1046. `electric-command-history-hook'
  1047. `electric-help-mode-hook'
  1048. `emacs-lisp-mode-hook'
  1049. `find-file-hooks'
  1050. `find-file-not-found-hooks'
  1051. `first-change-hook'
  1052. `fortran-comment-hook'
  1053. `fortran-mode-hook'
  1054. `ftp-setup-write-file-hooks'
  1055. `ftp-write-file-hook'
  1056. `indent-mim-hook'
  1057. `initial-calendar-window-hook'
  1058. `LaTeX-mode-hook'
  1059. `ledit-mode-hook'
  1060. `lisp-indent-function'
  1061. `lisp-interaction-mode-hook'
  1062. `lisp-mode-hook'
  1063. `list-diary-entries-hook'
  1064. `m2-mode-hook'
  1065. `mail-mode-hook'
  1066. `mail-setup-hook'
  1067. `mark-diary-entries-hook'
  1068. `medit-mode-hook'
  1069. `mh-compose-letter-hook'
  1070. `mh-folder-mode-hook'
  1071. `mh-letter-mode-hook'
  1072. `mim-mode-hook'
  1073. `minibuffer-setup-hook'
  1074. `news-mode-hook'
  1075. `news-reply-mode-hook'
  1076. `news-setup-hook'
  1077. `nongregorian-diary-listing-hook'
  1078. `nongregorian-diary-marking-hook'
  1079. `nroff-mode-hook'
  1080. `outline-mode-hook'
  1081. `plain-TeX-mode-hook'
  1082. `post-command-hook'
  1083. `pre-abbrev-expand-hook'
  1084. `pre-command-hook'
  1085. `print-diary-entries-hook'
  1086. `prolog-mode-hook'
  1087. `protect-innocence-hook'
  1088. `rmail-edit-mode-hook'
  1089. `rmail-mode-hook'
  1090. `rmail-summary-mode-hook'
  1091. `scheme-indent-hook'
  1092. `scheme-mode-hook'
  1093. `scribe-mode-hook'
  1094. `shell-mode-hook'
  1095. `shell-set-directory-error-hook'
  1096. `suspend-hook'
  1097. `suspend-resume-hook'
  1098. `temp-buffer-show-function'
  1099. `term-setup-hook'
  1100. `terminal-mode-hook'
  1101. `terminal-mode-break-hook'
  1102. `TeX-mode-hook'
  1103. `text-mode-hook'
  1104. `today-visible-calendar-hook'
  1105. `today-invisible-calendar-hook'
  1106. `vi-mode-hook'
  1107. `view-hook'
  1108. `window-setup-hook'
  1109. `write-contents-hooks'
  1110. `write-file-hooks'
  1111.